package com.alibaba.mq.consumer.consumer;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

import java.util.Map;


/**
 * @Description
 * @Author louxiujun
 * @Date 2020/6/21 23:12
 **/
@Component
@RabbitListener(queues = "topic.woman")
public class TopicTotalReceiver {
    @RabbitHandler
    public void process(@Payload Map<String, Object> payload,
                        Channel channel) {
        System.out.println("TopicTotalReceiver消费者收到消息  : " + payload.toString());
    }
}
